Fix and re-enable hyperprivop for ptc.ga (slow path only for now)
Signed-off-by: Dan Magenheimer <dan.magenheimer@hp.com>
cmp.eq p7,p6=XEN_HYPER_GET_RR,r17
(p7) br.sptk.many hyper_get_rr;;
+ // HYPERPRIVOP_PTC_GA?
+ cmp.eq p7,p6=XEN_HYPER_PTC_GA,r17
+(p7) br.sptk.many hyper_ptc_ga;;
+
// if not one of the above, give up for now and do it the slow way
br.sptk.many dispatch_break_fault ;;
rfi
;;
END(hyper_set_rr)
+
+ENTRY(hyper_ptc_ga)
+ br.spnt.many dispatch_break_fault ;;
+END(hyper_ptc_ga)
regs->r8 = val;
return 1;
case HYPERPRIVOP_PTC_GA:
- // FIXME: this doesn't seem to work yet, turned off
- //(void)vcpu_ptc_ga(v,regs->r8,regs->r9);
- //return 1;
- break;
+ (void)vcpu_ptc_ga(v,regs->r8,(1L << ((regs->r9 & 0xfc) >> 2)));
+ return 1;
case HYPERPRIVOP_ITR_D:
(void)vcpu_get_itir(v,&itir);
(void)vcpu_get_ifa(v,&ifa);